import request from '@/utils/requist'

export const industryFields = () => {
  return request({
    method: 'get',
    url: '/api/atlas/get_fields',
  })
}
// 产业政策
// 政策列表
export const policy = ({
  inid,
  page,
  perpage,
  category,
  org,
  year,
  keyword,
  level
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/industry/policyList',
    data: {
      inid,
      page,
      perpage,
      category,
      org,
      year,
      keyword,
      level
    }
  })
}
// 产业载体

// 园区列表 修改 添加行政区和园林分类
export const gardens = ({
  inid,
  cate,
  keyword,
  level,
  page,
  perpage,
  clasify
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/carrier/garden',
    data: {
      inid,
      cate,
      keyword,
      level,
      page,
      perpage,
      clasify
    }
  })
}

// 地图
export const map = ({
  inid,
  cate
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/enterprise/piecemap',
    data: {
      inid,
      cate
    }
  })
}
// 园区散点图
export const sdMap = ({
  inid,
  cate,
  keyword,
  level,
  page,
  perpage,
  clasify
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/zone/sdmap',
    data: {
      inid,
      cate,
      keyword,
      level,
      page,
      perpage,
      clasify
    }
  })
}


// 创新资源

// 获取筛选条件机构类型
export const innovateOrgs = () => {
  return request({
    method: 'get',
    url: '/api/atlas/innovate/fields',
  });
};

// 共为您查找到 家机构
export const apiInnovateOrgs = ({
  inid,
  cate,
  cateone,
  catetwo,
  page,
  perpage,
  product
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/innovate/orgs',
    data: {
      inid,
      cate,
      cateone,
      catetwo,
      page,
      perpage,
      product
    }
  });
};
// 创新地图
export const orgsSdMap = ({
  inid,
  cate,
  cateone,
  catetwo,
  page,
  perpage,
  product,
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/orgs/sdmap',
    data: {
      inid,
      cate,
      cateone,
      catetwo,
      page,
      perpage,
      product,
    }
  });
};
// 机构类型分布统计图
export const distribute = ({
  inid,
  cate,
  district
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/innovate/distribute',
    data: {
      inid,
      cate,
      district
    }
  });
};

// 骨干企业

// 产业发展图谱页筛选条件获取
export const screening = () => {
  return request({
    method: 'get',
    url: '/api/atlas/industry/field',
  })
}
// 选择、切换产业链 --- 产业集群 --- 展示气泡关系图
export const industryGraph = ({
  inid,
  cate
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/industry/nevigate',
    data: {
      inid,
      cate
    }
  })
}
// 选择、切换产业链 --- 二级产业 --- 展示原点气泡关系图
export const graphZero = ({
  inid,
  cate
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/ej/zero',
    data: {
      inid,
      cate
    }
  })
}
// 选择、切换产业链 --- 二级产业 --- 展示下一层级气泡关系图
export const graphNext = ({
  id,
  name
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/ej/next',
    data: {
      id,
      name
    }
  })
}
// 二级产业 --- 链图
export const chain = ({
  inid,
  district
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/industry/chain',
    data: {
      inid,
      district
    }
  })
}
// 是否收藏
export const industryCollect = ({
  id
}) => {
  return request({
    method: 'get',
    url: '/api/atlas/inducollect/' + id,
  })
}
// 点击收藏
export const reversalCollect = ({
  id,
  collect
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/industry/collect',
    data: {
      collect,
      id
    }
  })
}



// product  为二级产业的name 不带特殊符号
// 产业发展图谱页太原市企业列表
export const enterpriseList = ({
  inid,
  cate,
  page,
  perpage,
  entype,
  product,
  company_name,
  qualificat,
  quoted,
}) => {
  // capital,
  // district,
  // yearid,
  // roundid,
  // sorts,
  return request({
    method: 'post',
    url: '/api/atlas/industry/enterprise',
    data: {
      inid,
      cate,
      page,
      perpage,
      entype,
      product,
      quoted,
      company_name,
      qualificat,
      capital: '',
      district: '',
      yearid: '',
      roundid: '',
      sorts: '',
    }
  })
}
// 太原市企业年度柱状图 --- 弃用
export const enterpriseBar = ({
  inid,
  cate,
  page,
  perpage,
  entype,
  product,
  company_name,
  qualificat,
  quoted,
}) => {
  // capital,
  // district,
  // yearid,
  // roundid,
  // sorts,
  return request({
    method: 'post',
    url: '/api/atlas/industry/statistics',
    data: {
      inid,
      cate,
      page,
      perpage,
      entype,
      product,
      quoted,
      company_name,
      qualificat,
      capital: '',
      district: '',
      yearid: '',
      roundid: '',
      sorts: '',
    }
  })
}
// 产业发展图谱页太原市行业下企业总览 --- 弃用
export const enterpriseTotal = ({
  inid,
  cate,
  page,
  perpage,
  entype,
  product,
  company_name,
  qualificat,
  quoted,
}) => {
  // capital,
  // district,
  // yearid,
  // roundid,
  // sorts,
  return request({
    method: 'post',
    url: '/api/atlas/industry/overview',
    data: {
      inid,
      cate,
      page,
      perpage,
      entype,
      product,
      quoted,
      company_name,
      qualificat,
      capital: '',
      district: '',
      yearid: '',
      roundid: '',
      sorts: '',
    }
  })
}
// 散点图 --- 点击气泡 点击地图 点击二级产业-product
export const EpSdMap = ({
  inid,
  cate,
  district,
  product
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/enterprise/sdmap',
    data: {
      inid,
      cate,
      district,
      product
    }
  })
}
// 热力地图
export const hotMap = ({
  inid,
  cate, district,
  product
}) => {
  return request({
    method: 'post',
    url: '/api/atlas/enterprise/count',
    data: {
      inid,
      cate,
      district,
      product
    }
  })
}

